package com.app.logger.entity;

import com.app.core.mybatis.BaseEntity;
import com.app.logger.model.LoggerType;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 系统日志表，包括操作日志和运维日志
 */
@Setter
@Getter
@ApiModel(description = "用户表")
@TableName(value = "log", autoResultMap = true)
public class Logger extends BaseEntity {

    /**
     * 请求唯一标识
     */
    @ApiModelProperty(value = "请求唯一标识", example = "1", position = 7)
    private String xid;
    /**
     * IP地址
     */
    @ApiModelProperty(value = "IP地址", example = "1", position = 8)
    private String clientIp;
    /**
     * 请求参数
     */
    @ApiModelProperty(value = "请求参数", example = "1", position = 9)
    private String requestParam;
    /**
     * 请求类型
     */
    @ApiModelProperty(value = "请求类型", example = "1", position = 10)
    private String requestType;
    /**
     * 请求路径
     */
    @ApiModelProperty(value = "请求路径", example = "1", position = 11)
    private String requestUri;
    /**
     * 请求方法
     */
    @ApiModelProperty(value = "请求方法", example = "1", position = 12)
    private String requestMethod;
    /**
     * 请求结果
     */
    @ApiModelProperty(value = "请求结果", example = "1", position = 13)
    private String requestResult;
    /**
     * 操作人用户名称
     */
    @ApiModelProperty(value = "操作人用户名称", example = "1", position = 14)
    private String username;
    /**
     * 操作人用户账户
     */
    @ApiModelProperty(value = "操作人用户账户", example = "1", position = 15)
    private String userId;
    /**
     * 日志描述
     */
    @ApiModelProperty(value = "日志描述", example = "1", position = 16)
    private String description;
    /**
     * 耗时
     */
    @ApiModelProperty(value = "耗时", example = "1", position = 17)
    private Long costTime;
    /**
     * 日志类型
     */
    @ApiModelProperty(value = "日志类型", example = "1", position = 18)
    private LoggerType logType;
    /**
     * 异常信息
     */
    @ApiModelProperty(value = "异常信息", example = "1", position = 19)
    private String errorInfo;

}
